package ru.spb.nicetu.schoolproject.gui;

import ru.spb.nicetu.schoolproject.TblModelForMark;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Created by dchernyshov on 16.04.15.
 */
public class MarkFrame extends CommonDialog<TblModelForMark> {
    private JButton performanceBtn;

    public MarkFrame() {
        super(new TblModelForMark());
        setTitle("Оценки");
        performanceBtn = new JButton("Успеваемость");
        performanceBtn.addActionListener(new BtnPerformanceListener());
        lastBox.add(Box.createHorizontalStrut(10));
        lastBox.add(performanceBtn);
    }

    public class BtnPerformanceListener implements ActionListener {
        @Override
        public void actionPerformed(ActionEvent actionEvent) {
            JDialog dialog = new PerformanceFrame();
            dialog.setVisible(true);
        }
    }
}
